﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.Collections.ObjectModel;
using System.IO;

namespace FotoBrowserWPF
{
    public class FotoMetadatas: ObservableCollection<FotoMetadata>
    { }

    public class FotoMetadata:INotifyPropertyChanged 
    {
        public event PropertyChangedEventHandler PropertyChanged;
        protected void Notify(string propName)
        {
            if (this.PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propName));
            }
        }

        int fotoID;
        public int FotoID { 
            get
            { return this.fotoID;}
            set
            {
                if (this.fotoID == value)
                    return;
                this.fotoID = value;
                Notify("FotoID");
            }
        }

        string path;
        public string Path 
        {
            get { return this.path; }
            set
            {
                if (this.path == value)
                    return;
                this.path = value;
                Notify("Path");
            }
        
        }

        string title;
        public string Title
        {
            get { return this.title; }
            set
            {
                if (this.title == value)
                    return;
                this.title = value;
                Notify("Title");
            }
        }
        DateTime date;
        public DateTime Date
        {
            get { return this.date; }
            set
            {
                if (this.date == value)
                    return;
                this.date = value;
                Notify("Date");
            }
        }

        
       
    }
}
